<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/7/8
 * Time: 11:11
 */

namespace app\api\job;

use fast\Http;
use think\queue\Job;
use think\Db;

class SendClientMsg
{
    protected $url = 'http://192.168.10.10:9502';

    function fire(Job $job,$data)
    {
        $data['username'] = Db::name('user')->where('id',$data['user_id'])->value('username');
        $res = Http::get($this->url,[
            'type'  => 'zj',
            'info'  => $data
        ]);
        $job->delete();
    }

}